﻿using System.Collections.Generic;
using CI.Organism;

namespace CI.Interfaces
{
    /// <summary>Evaluate the fitness of organisms in the environment</summary>
    public interface IFitnessFunction
    {
        /// <summary>
        /// Evaluate the orgainsms and update in... this could be collison detection/area covered/objects placed
        /// to be called every cycle or 
        /// </summary>
        /// <param name="organisms"></param>
        void UpdateOrganisms(IOrganismCollection organisms);

        /// <summary>
        /// Return a list with the fittest one first then to the last
        /// </summary>
        /// <param name="organisms"></param>
        /// <returns></returns>
        List<IOrganism> Fittest(IOrganismCollection organisms);


        /// <summary>
        /// Evaluate the organisms fitness
        /// </summary>
        /// <param name="organism"></param>
        /// <returns></returns>
        long EvaluateFitnessAndUpdateInternalFitnessValue(IOrganism organism);
    }
}